package example.lesson08_02;

public class TestInterface {
    public static void main(String[] args) {
       Flyable flyable=new Bird();
       flyable.fly();
       flyable=new Airplane();
       flyable.fly();
    }
}
interface Flyable{
    void fly();
}
class Bird implements Flyable{
    @Override
    public void fly(){
        System.out.println("bird fly");
    }
}
class Airplane implements Flyable{
    @Override
    public void fly(){
        System.out.println("airplane fly");
    }
}